
<header>
        <?php echo $this->getBlockHtml('formkey') ?>
        <div class=" header-mall header-mallss">
            <ul>
                <li class="header-mall-li1 "><a href="<?php echo $this->getUrl('catalog/category/view',array('id'=>12));?>"><span  class="fa fa-angle-left fa-4x"></span></a></li>
                <li class="header-mall-li2 header-mall-li2-li1">
                    <span></span><a href="#" class="uer-login"><?php echo $this->__('购物车') ?></a>

                </li>
                <li class="header-mall-li3 header-mall-li3-li1">
                    <div class="cart-scan">
                        <a href="http://scan-button" id="scan-button"><img src="<?php echo $this->getSkinUrl('images/qrcode.png'); ?>"/></br>
                        扫一扫</a>
                    </div>
                    <button name="update_cart_action" value="empty_cart" title="<?php echo $this->__('Clear Shopping Cart'); ?>" class="button btn-update btn-clear empty_cart_button"><?php echo $this->__('清空'); ?></button>
                </li>
            </ul>
        </div>
</header>
<script type="text/javascript">
function onProductScanned(sku)
{
    if(!sku){return};
    var link = "<?php echo $this->getUrl('checkout/cart/addAjax')?>?sku="+sku;
    jQuery.get(link,function(data){
        if (JSON.parse(data).code == 200) {
            if( typeof changeShoppingCartNumber === 'function'){
                    changeShoppingCartNumber(JSON.parse(data).count);
            } 
            location.reload(true);
            layer.open({
                type:2,
                shadeClose:false,
            });
            $j(".layermbox2 .layermcont i").css({height:"0.2rem",width:"0.2rem"});
            
        }else{
            layer.open({
                content:"抱歉，没有这件商品！",
                style:"font-size:0.2rem;font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif;width:70%;",
                time:2,
            })
            $j('.layermcont').css({'line-height':'1.2rem','padding':'0'});
        }
    })
}
</script>


